# -*- coding:utf-8 -*-

from django.shortcuts import render
from django.http import HttpResponse
from EU.info.news import get_news_list

import json

def index(request):
    return HttpResponse('Hello,world')

def add(request):
    a = request.GET['a']
    b = request.GET['b']
    c = int(a) + int(b)
    return HttpResponse(str(c))

def home(request):
    dict = get_news_list(0,4);
    print(dict)
    return HttpResponse(str(json.dumps(dict)))
